<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>$vo['name']))}
	<div class="oprator-panel">
		<a onclick="go_return_url();" class="btn">返回</a>
		<if condition="$auth['admin']">
			<a id="btn_del" class="btn btn-del">删除</a>
		</if>
		<div class="split"></div>
		<a onclick="winprint()" class="btn  hidden-xs">打印</a>
		<if condition="($auth['write']) and ($vo.user_id eq get_user_id())">
			<a onclick="edit();" class="btn">修改</a>
		</if>
	</div>
	<div class="sub-frame gray">
		<form method='post' id="form_content" name="form_content" enctype="multipart/form-data"   >
			<input type="hidden" id="id" name="id" value="{$vo.id}">
			<div class="frame">
				<div class="bit-2">
					<div class="layui-form-item">
						<label class="layui-form-label" >文件名：</label>
						<div class="layui-input-block">
							<p class="layui-input-static">
								{$vo.name}
							</p>
						</div>
					</div>
				</div>
				<div class="bit-2">
					<div class="layui-form-item">
						<label class="layui-form-label" >文件编号：</label>
						<div class="layui-input-block">
							<p class="layui-input-static">
								{$vo.doc_no}
							</p>
						</div>
					</div>
				</div>
			</div>
			<div class="frame">
				<div class="bit-2">
					<div class="layui-form-item">
						<label class="layui-form-label" >登录人：</label>
						<div class="layui-input-block">
							<p class="layui-input-static">
								{$vo.user_name}
							</p>
						</div>
					</div>
				</div>
				<div class="bit-2">
					<div class="layui-form-item">
						<label class="layui-form-label" >登录日期：</label>
						<div class="layui-input-block">
							<p class="layui-input-static">
								{$vo.create_time|to_date='Y年m月d日 H:i'}
							</p>
						</div>
					</div>
				</div>
			</div>
			<div class="frame">
				<div class="bit-1">
					<div class="layui-form-item x-text">
						<div class="layui-input-block">
							<div class="content-wrap" >
								{$vo.content}
							</div>
						</div>
					</div>
				</div>
				<div class="frame">
					<div class="bit-1">
						<div class="layui-form-item">
							<label class="layui-form-label" for="name">附件：</label>
							<div class="layui-input-block">
								{:W('FileUpload/view',array('add_file'=>$vo['add_file'],'mode'=>'show'))}
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use('global', function() {
			var $ = layui.jquery;
			$("#btn_del").on('click', function() {
				layer.msg('确定要删除吗?', {
					time : 0,
					btn : ['确定', '取消'],
					yes : function() {
						send_ajax("{:U('del')}", 'id=' + $("#id").val(), function(data) {
							if (data.status) {
								layer.msg(data.info, function() {
									go_return_url();
								});
							}
						});
					},
					no : function(index) {
						layer.close(index);
					}
				});
			});

		});
		function edit() {
			window.open(fix_url("{:U('edit')}?id=" + $("#id").val()), "_self");
		}
	</script>
</block>